<template>
  <div class="wrapper">
    <!-- <el-input
      placeholder="请输入内容"
      suffix-icon="el-icon-search"
      v-model="input1"
      @keyup.native.enter="InputHandler"
      >
    </el-input> -->
    <el-button
      icon="el-icon-plus"
      @click="addPro($event)" v-if="btnName?true:false"
    >{{btnName}}</el-button>
  </div>
</template>

<script>
export default {
  name: 'searchAdd',
  props: {
    btnName: {
      type: String
    }
  },
  data () {
    return {
      input1: ''
    }
  },
  methods:{
    addPro(e){
      console.log(e);
      this.$emit('add-link',e)
    },
    InputHandler(){
      this.$emit("searchinput",this.input1)
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.wrapper {
  width: 100%;
  height: 40px;
}
</style>

<style scoped>
.wrapper .el-input {
  width: 400px;
  height: 40px;
  margin-left: 32px;
  border-radius: 4px;
  color: #2fe2e1;
  background-color: #f2f4f9;
} 
.el-input__icon {
  width: 39px;
  font-size: 24px;
}
.el-button {
  float: right;
  width: 110px;
  margin-right: 32px;
}
</style>